package controller;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.nio.charset.Charset;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class Test {
	public static void main(String[] args) {
		try {
			URL dataURL = new URL("http://whois-server.net/?query=5ty.org");

			BufferedReader reader = new BufferedReader(new InputStreamReader(
					dataURL.openStream(), Charset.forName("UTF-8")));
			String content = "";
			while (1 == 1) {
				String str = reader.readLine();
				if (str == null)
					break;
				content += str+"\n";

			}

			Document doc = Jsoup.parse(content);
			System.out.println(doc);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}
}
